home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / cprot20h.zip / GLOBAL.BAS < prev    next >
BASIC Source File  |  1995-07-07  |  6KB  |  93 lines

  1. '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. '
  3. '               Global declarations for CProtect
  4. '
  5. '               ⌐   Thomas Lichtneckert 1995
  6. '                   Nordenski÷ldsgatan 24
  7. '                   S-413 09 G÷teborg
  8. '                   Sweden
  9. '               fax:    +46 - 31 121 621
  10. '               voice:  +46 - 31 145 131
  11. '               email:  Thomas.Lichtneckert@abc.se
  12. '
  13. '               NB comment/uncomment the proper section of
  14. '                   funtion declarations
  15. '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  16.  
  17. Global Const FILE_NOT_FOUND = -10
  18. Global Const PATH_NOT_VALID = -11
  19. Global Const NO_PATH = -12
  20. Global Const NOT_REMOVABLE = -13
  21.  
  22. Global Const DRIVE_OK = 0
  23. Global Const NO_ARGUMENTS = 1
  24. Global Const DRIVE_NOT_FLOPPY = 2
  25. Global Const DRIVE_NOT_READY = 3
  26. Global Const DRIVE_NOT_VALID = 4
  27. Global Const DRIVE_ERROR = 5
  28. Global Const WRONG_DISKETTE = 6
  29. Global Const DRIVE_WRPROT = 7
  30. Global Const DRIVE_WRPROT_A = 8
  31. Global Const DRIVE_WRPROT_B = 9
  32. Global Const DISK_ISIN_A = 10
  33. Global Const DISK_ISIN_B = 11
  34.  
  35. Global Const NOT_REGISTERED = 20
  36. Global Const NO_REGINFO = 21
  37. Global Const NO_SERNUMBER = 22
  38. Global Const FEATURES_NOT_AVAILABLE = 23
  39. Global Const WRONG_CODE = 24
  40.  
  41. Global Const IS_REGISTERED = 748
  42.  
  43. '--------------------------------------------------------------------------------
  44. ' these function definitions are for the developer version using cprot20d.dll
  45. '--------------------------------------------------------------------------------
  46. Declare Function cpMakeRegCode Lib "cprot20d.dll" (ByVal accesscode%, ByVal serialnum$, ByVal regcode$) As Integer
  47. Declare Function cpCFGMake Lib "cprot20d.dll" (ByVal path$, ByVal magic&, ByVal filever&) As Integer
  48. Declare Function cpGetSernum Lib "cprot20d.dll" (ByVal path$, ByVal serialnum$) As Integer
  49. Declare Function cpRegisterProgram Lib "cprot20d.dll" (ByVal path$, ByVal regcode$) As Integer
  50. Declare Function cpCheckRegCode Lib "cprot20d.dll" (ByVal path$, ByVal regcode$) As Integer
  51. Declare Function cpGetRegisteredName Lib "cprot20d.dll" (ByVal path$, ByVal uname$) As Integer
  52. Declare Function cpGetRegisteredCompany Lib "cprot20d.dll" (ByVal path$, ByVal company$) As Integer
  53. Declare Function cpSetRegisteredNames Lib "cprot20d.dll" (ByVal path$, ByVal uname$, ByVal company$) As Integer
  54. Declare Function cpIsRegistered Lib "cprot20d.dll" (ByVal path$) As Integer
  55. Declare Function cpGetUParams Lib "cprot20d.dll" (ByVal path$, lparam&, iparam1%, iparam2%, iparam3%, iparam4%, iparam5%) As Integer
  56. Declare Function cpSetUParams Lib "cprot20d.dll" (ByVal path$, ByVal lparam&, ByVal iparam1%, ByVal iparam2%, ByVal iparam3%, ByVal iparam4%, ByVal iparam5%) As Integer
  57. Declare Function cpSetFTime Lib "cprot20d.dll" (ByVal path$, ByVal fdate&, ByVal ftime%) As Integer
  58. Declare Function cpWhichDrive Lib "cprot20d.dll" (ByVal file$) As Integer
  59. Declare Function cpDirRemove Lib "cprot20d.dll" (ByVal path$) As Integer
  60. Declare Function cpStartProgram Lib "cprot20d.dll" (ByVal path$) As Integer
  61. Declare Function cpEndProgram Lib "cprot20d.dll" (ByVal path$) As Integer
  62. Declare Function cpGetUStatistics Lib "cprot20d.dll" (ByVal path$, utimes%, totalhour%, totalmin%, totalsec%, lasthour%, lastMin%, lastsec%) As Integer
  63. Declare Function cpGetFileinfo Lib "cprot20d.dll" (ByVal path$, version&) As Long
  64.  
  65.  
  66. '--------------------------------------------------------------------------------
  67. ' these function definitions are for the user version using cprot20u.dll
  68. '--------------------------------------------------------------------------------
  69. 'Declare Function cpCFGMake Lib "cprot20u.dll" (ByVal path$, ByVal magic&, ByVal filever&) As Integer
  70. 'Declare Function cpGetSernum Lib "cprot20u.dll" (ByVal path$, ByVal serialnum$) As Integer
  71. 'Declare Function cpRegisterProgram Lib "cprot20u.dll" (ByVal path$, ByVal regcode$) As Integer
  72. 'Declare Function cpCheckRegCode Lib "cprot20u.dll" (ByVal path$, ByVal regcode$) As Integer
  73. 'Declare Function cpGetRegisteredName Lib "cprot20u.dll" (ByVal path$, ByVal uname$) As Integer
  74. 'Declare Function cpGetRegisteredCompany Lib "cprot20u.dll" (ByVal path$, ByVal company$) As Integer
  75. 'Declare Function cpSetRegisteredNames Lib "cprot20u.dll" (ByVal path$, ByVal uname$, ByVal company$) As Integer
  76. 'Declare Function cpIsRegistered Lib "cprot20u.dll" (ByVal path$) As Integer
  77. 'Declare Function cpGetUParams Lib "cprot20u.dll" (ByVal path$, lparam&, iparam1%, iparam2%, iparam3%, iparam4%, iparam5%) As Integer
  78. 'Declare Function cpSetUParams Lib "cprot20u.dll" (ByVal path$, ByVal lparam&, ByVal iparam1%, ByVal iparam2%, ByVal iparam3%, ByVal iparam4%, ByVal iparam5%) As Integer
  79. 'Declare Function cpSetFTime Lib "cprot20u.dll" (ByVal path$, ByVal fdate&, ByVal ftime%) As Integer
  80. 'Declare Function cpWhichDrive Lib "cprot20u.dll" (ByVal file$) As Integer
  81. 'Declare Function cpDirRemove Lib "cprot20u.dll" (ByVal path$) As Integer
  82. 'Declare Function cpStartProgram Lib "cprot20u.dll" (ByVal path$) As Integer
  83. 'Declare Function cpEndProgram Lib "cprot20u.dll" (ByVal path$) As Integer
  84. 'Declare Function cpGetUStatistics Lib "cprot20u.dll" (ByVal path$, utimes%, totalhour%, totalmin%, totalsec%, lasthour%, lastMin%, lastsec%) As Integer
  85. 'Declare Function cpGetFileinfo Lib "cprot20u.dll" (ByVal path$, version&) As Long
  86.  
  87. '------------------------------------------------------------------------------
  88. ' some parameters for this specifik program
  89. '------------------------------------------------------------------------------
  90. Global Const magicnumber = &H54534554
  91. Global Const fileversion = 1
  92. Global fileisok
  93.